package com.niit.springbootshop.service.impl;

import com.niit.springbootshop.dao.UserDao;
import com.niit.springbootshop.entity.User;
import com.niit.springbootshop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: springboot-demo
 * @description:
 * @author: hanliang
 * @create: 2021-05-08 14:13
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserDao dao;

    @Override
    public int insertSelective(User record) {
        return dao.insertSelective(record);
    }

    @Override
    public int updateByCode(String code) {
        return dao.updateByCode(code);
    }

    @Override
    public User selectByUsernameAndPassword(User user) {
        return dao.selectByUsernameAndPassword(user);
    }
}
